package com.siebre.picclife.asynctask.springconfig;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;

import com.siebre.picclife.asynctask.service.TaskFactory;
import com.siebre.picclife.asynctask.service.support.ArgumentSerializerResolver;
import com.siebre.picclife.asynctask.service.support.DefaultTaskFactory;

@Configuration
@Import({TaskArgumentHandlerConfig.class, TaskRepositoryConfig.class})
@ImportResource("classpath:spring/integration/task-creation.xml")
public class TaskCreationConfig {
	
	@Bean
	TaskFactory taskFactory(ArgumentSerializerResolver serializerResolver) {
		DefaultTaskFactory result = new DefaultTaskFactory(serializerResolver);
		return result;
	}
}